package com.jwmp.rbac.domain;

import java.util.List;

/**
 * @Description 角色模型，用于封装权限数据
 * @Version 1.0
 */
public class Role {
    private Long   id;                          // 唯一标识
    private String name;                        // 角色名称
    private String introduce;                   // 描述
    private List<Permission> permissionList;    // 保存多个权限
    private List<Employee> empList;                // 角色可以赋予多个用户

    public Role() {
    }

    public Role(String name) {
        this.name = name;
    }

    public Role(String name,String introduce) {
        this.name = name;
        this.introduce = introduce;
    }

    public Role(Long id, String name,String introduce) {
        this.id = id;
        this.name = name;
        this.introduce = introduce;
    }

    public Role(Long id, String name,String introduce,List<Permission> permissionList) {
        this.id = id;
        this.name = name;
        this.introduce = introduce;
        this.permissionList = permissionList;
    }

    public Role(Long id, String name, List<Permission> permissionList, List<Employee> empList) {
        this.id = id;
        this.name = name;
        this.permissionList = permissionList;
        this.empList = empList;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Permission> getPermissionList() {
        return permissionList;
    }

    public void setPermissionList(List<Permission> permissionList) {
        this.permissionList = permissionList;
    }

    public List<Employee> getEmpList() {
        return empList;
    }

    public void setUserList(List<Employee> userList) {
        this.empList = empList;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String toString() {
        return "Role{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", introduce='" + introduce + '\'' +
                ", permissionList=" + permissionList +
                ", userList=" + empList +
                '}';
    }
}
